<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>签名注册</title>		
		<link rel="stylesheet" type="text/css" href="../css/aui.css" />
		<style type="text/css">
			.hide {
				display: none;
			}
		</style>
	</head>
	<body>
		<div class="aui-bar aui-bar-nav aui-bar-warning head show" >
			<a class="aui-btn aui-btn-warning aui-pull-left"   tapmode="" onclick="Help()"> <span class="aui-iconfont aui-icon-question"></span> </a>			
			<div class="aui-title">
				签名注册
			</div>
			<a class="aui-pull-right"> <span class="aui-iconfont aui-icon-settings" tapmode="" onclick="Settings()"></span> </a>
		</div>
	</body>
	<script type="text/javascript" src="../script/api.js"></script>
	<script type="text/javascript">
		var userinfo = {};
		// 解决状态栏重合，并优化fixStatusBar代码,Android4.4版本以上添加25px
		function fixStatusBar(headerid, callback) {
			var header = $api.dom('.show');
			var systemType = api.systemType;
			var systemVersion = parseFloat(api.systemVersion);
			if (systemType == "ios" || (systemType == "android" && systemVersion >= 4.4)) {
				if (systemType == "android") {
					header.style.paddingTop = '25px';
				}
				$api.fixStatusBar(header);
			} else {
				$api.fixIos7Bar(header);
			}
			var headerPos = $api.offset(header);
			if ( typeof callback == "function") {
				callback(headerPos);
			}
		}

		function Help() {
			api.openWin({
				name : 'help_win',
				url : 'help_win.html'
			});
		}

		function Settings() {
			api.openWin({
				name : 'set_win',
				url : 'set_win.html'
			});
		}

		apiready = function() {		
			setTimeout(function() {
				api.removeLaunchView()
			}, 1000);
			var signame = $api.getStorage("signame");
			var uid = $api.getStorage("uid");			
			var headerid = "aui-header1";
			// 获取底部的高度
			fixStatusBar(headerid, function(headerPos) {
				api.openFrame({
					name : 'signEnroll_frm',
					url : 'signEnroll_frm.html',
					rect : {
						x : 0,
						y : headerPos.h,
						w : 'auto',
						h : 'auto'// footerPos.h是底部的高度,也可以直接获取main的高度
					},
					pageParam : {
						signame : userinfo.sig
					},
					bounces : false,
					bgColor : 'rgba(0,0,0,0)',
					vScrollBarEnabled : false,
					hScrollBarEnabled : false
				});
				api.setScreenOrientation({
					orientation : 'auto'
				});
			});			
		};
	</script>
</html>